import { Button, Result } from 'antd';
import { useNavigate } from 'react-router-dom';

const NotPermission = () => {
    /* 状态数据管理 ----------------------------------------------------------*/
    const navigate = useNavigate();

    /* 逻辑代码 -------------------------------------------------------------*/
    const goHome = () => {
        navigate('/welcome');
    };

    return (
        <Result
            status="403"
            title="403"
            subTitle="抱歉，您当前没有权限访问此页面"
            extra={
                <Button
                    type="primary"
                    onClick={goHome}
                >
                    返回首页
                </Button>
            }
        />
    );
};

export default NotPermission;
